<%
//下载APP
layout("/inc/layout.html",{
title:'个体商户基本信息 - 工商申请 - 智慧洛龙',
keywords:'个体商户基本信息,工商申请,智慧洛龙',
description:'个体商户基本信息,工商申请,智慧洛龙',
style:'index.css'
}){
%>

<section class="container mt15">
    <div id="location-box">
    <div class="panel panel-info">
        <div class="panel-heading text-center center-block">
            <div class="btn-group">
                <% layout("/merchant/title.html"){} %>
            </div>
        </div>
        <div class="panel-body">
            <form class="form-horizontal col-sm-offset-1 col-sm-9" id="merchantIndexForm" method="post" role="form">
                <input id="id" name="id" class="form-control" type="hidden" value="${merchantApply.id!}">
                <legend>个体商户基本信息&emsp;&emsp;<span class="text text-danger" id="messageCode"></span></legend>

                <div class="form-group">
                    <label for="merchantBrand" class="col-sm-2 control-label">商户名称：</label>
                    <div class="col-sm-10 mt5">
                        <div class="input-group">
                            <span class="input-group-addon">洛阳市洛龙区</span>
                            <input id="merchantBrand" name="merchantBrand" class="form-control" type="text" placeholder="字号；例：牡丹、花城、花都" required="required" aria-required="true" minlength="2" maxlength="15"
                                   value="${merchantApply.merchantBrand!}">
                        </div>
                    </div>
                </div>


                <div class="form-group">
                    <label for="merchantBrand" class="col-sm-2 control-label"></label>
                    <div class="col-sm-5 mt5">
                        <div class="input-group">
                            <span class="input-group-addon">行业</span>
                            <input id="industry" name="industry" class="form-control" type="text" placeholder="行业；例：小吃、五金、汽修" required="required" aria-required="true" minlength="1" maxlength="15" value="${merchantApply.industry!}">
                        </div>
                    </div>
                    <div class="col-sm-5 mt5">
                        <div class="input-group">
                            <span class="input-group-addon">类型</span>
                            <input id="merchantType" name="merchantType" class="form-control" type="text" placeholder="类型；例：便利店、厂、超市、店" required="required" aria-required="true" minlength="1" maxlength="15" value="${merchantApply.merchantType!}">
                        </div>
                    </div>
                </div>


                <div class="form-group">
                    <label for="merchantBrand" class="col-sm-2 control-label">备选字号：</label>
                    <div class="col-sm-offset-2 ">
                        <%
                        if(isNotEmpty(brandOptionalList)){
                        for(var i=0;i < 4;i++){
                        if((i+1) <= brandOptionalList.~size){ %>
                        <div class="col-sm-3">
                            <input name="merchantBrandOptionalList" class="form-control mt10" type="text" value="${brandOptionalList[i]}">
                        </div>
                        <% }else{ %>
                        <div class="col-sm-3">
                            <input name="merchantBrandOptionalList" class="form-control mt10" type="text">
                        </div>
                        <% } } }else{
                        for(var i=0;i < 4;i++){ %>
                        <div class="col-sm-3">
                            <input name="merchantBrandOptionalList" class="form-control mt10" type="text">
                        </div>
                        <% } } %>
                    </div>

                </div>

                <div class="form-group">
                    <label for="merchantAddress" class="col-sm-2 control-label">经营场所：</label>
                    <div class="col-sm-10">
                        <div class="input-group">
                            <!--请填写洛阳市洛龙区的地址，具体到门牌号-->
                            <span class="input-group-addon">洛阳市洛龙区</span>
                            <input id="merchantAddress" name="merchantAddress" class="form-control" type="text" placeholder="请填写地址，必须和《租赁合同或房产证》上地址保持一致" required="required" aria-required="true" minlength="5" maxlength="50" value="${merchantApply.merchantAddress!}">
                        </div>
                    </div>
                </div>


                <div class="form-group">
                    <label for="businessScope" class="col-sm-2 control-label">经营范围：</label>
                    <div class="col-sm-10">
                        <textarea name="businessScope" class="form-control" id="businessScope" rows="5" placeholder="请输入经营范围" required="required">${merchantApply.businessScope!}</textarea>
                    </div>
                </div>

                <div class="form-group">
                    <label for="employees" class="col-sm-2 control-label">从业人数：</label>
                    <div class="col-sm-10">
                        <div class="input-group">
                            <input id="employees" name="employees" class="form-control" type="number" placeholder="请输入从业人数" required="required" aria-required="true" min="1" maxlength="10" value="${merchantApply.employees!}">
                            <span class="input-group-addon">个人</span>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="registeredCapital" class="col-sm-2 control-label">资金数额：</label>
                    <div class="col-sm-10">
                        <div class="input-group">
                            <input id="registeredCapital" name="registeredCapital" class="form-control" type="number" placeholder="请输入资金数额（万元）" required="required" aria-required="true" min="1" maxlength="10" value="${merchantApply.registeredCapital!}">
                            <span class="input-group-addon">万元</span>
                        </div>
                    </div>
                </div>


                <div class="form-group">
                    <label for="imagesUploader" class="col-sm-2 control-label">办理资料：</label>
                    <div class="col-sm-10" id="upload-file-list">
                        <div id="camera_tool_open"></div>
                        <input id="imagesUploader" name="files" class="form-control" type="file" multiple="multiple" data-msg-placeholder="请上传《租赁合同或房产证》照片，可上传多张。">
                        <div id="error-message"></div>
                        <hr>
                        <div class="center-block row" id="imagesUploadShow">
                            <% if(isNotEmpty(merchantApplyImagesList)){
                            for(merchantImage in merchantApplyImagesList){ %>
                            <div class="col-xs-12 col-sm-4 mb15">
                                <div class="thumbnail images-box"><input type="hidden" name="merchantImagesList" value="${merchantImage.img}">
                                    <a    href="${uploaderFilesDomain!'/'}${merchantImage.img}" target="_blank"><img src="${uploaderFilesDomain!'/'}${merchantImage.img}"></a>
                                </div>
                                <div class="caption">
                                    <div class="btn btn-block btn-danger deletetCover" onclick="$(this).parent().parent().remove()"><i class="iconfont icon-remove"></i>&nbsp;删除</div>
                                </div>
                            </div>
                            <% } } %>
                        </div>
                    </div>
                </div>

                <div id="camera_tool_close"></div>

            </form>
        </div>

        <div class="panel-footer">
            <div class="col-sm-offset-3 clearfix">
                <div class="mt5 mb5 block col-sm-3">
                    <button type="button" id="retrunUserIndex" class="btn btn-warning btn-lg btn-outline btn-block">返回列表</button>
                </div>
                <div class="mt5 mb5 block col-sm-3">
                    <button type="button" id="doSubmit" class="btn btn-danger btn-lg btn-outline btn-block">下一步</button>
                </div>
            </div>
        </div>

    </div>
    </div>
</section>
<% } %>
<script src="/static/start/modules/main.js"></script>
<script src="/static/start/modules/Camera.js"></script>
<script>
    require(['modules/merchant_apply'], function (apply) {
        apply.index();
    });
</script>
</body>
</html>